package org.duang.pay.request;

import org.duang.pay.core.IPayRequest;

/**
 * 微信红包对象
 * @author laotang
 *
 */
public class WXRedPack implements IPayRequest {

	private static final String APP_ID = "f0d348782e664f92ae8425691b54be6d";
	private static final String REDPACK_TYPE = "W";
	private static final String APP_NAME_FIELD = "qingplus";		//默认为轻加
	
	private String appid; // 应用ID
	private String orderid; // 合作商户网站唯一订单号
	private String openid; // 用户OPENID
	private String body; // 备注
	private double price; // 红包总金额(元为单位)
	private int totalNum; // 红包发放总人数
	private String wishing; // 红色祝福语
	private String actName; // 活动名称
	private String paytype;			// 红包类型
	private String appName;		// 公众号名称
	private String title;

	public WXRedPack() {
		this.appid = APP_ID;
		this.paytype = REDPACK_TYPE;
		this.appName = APP_NAME_FIELD;
	}
	
	public WXRedPack(String appName) {
		this.appid = APP_ID;
		this.paytype = REDPACK_TYPE;
		this.appName = appName;
	}

	public WXRedPack(String appid, String orderid, String openid,  String body, double price,
			int totalNum, String wishing, String actName, String appName, String title) {
		super();
		this.appid = appid;
		this.orderid = orderid;
		this.openid = openid;
		this.body = body;
		this.price = price;
		this.totalNum = totalNum;
		this.wishing = wishing;
		this.actName = actName;
		this.appName = appName;
		this.title = title;
		this.paytype = REDPACK_TYPE;
	}

	@Override
	public String toString() {
		return "WXRedPack [appid=" + appid + ", orderid=" + orderid + ", openid=" + openid + ", body=" + body
				+ ", price=" + price + ", totalNum=" + totalNum + ", wishing=" + wishing + ", actName=" + actName + ", paytype=" + paytype + "]";
	}

	@Override
	public String getAppid() {
		return this.appid;
	}

	public String getOrderid() {
		return orderid;
	}

	public void setOrderid(String orderid) {
		this.orderid = orderid;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getTotalNum() {
		return totalNum;
	}

	public void setTotalNum(int totalNum) {
		this.totalNum = totalNum;
	}

	public String getWishing() {
		return wishing;
	}

	public void setWishing(String wishing) {
		this.wishing = wishing;
	}

	public String getActName() {
		return actName;
	}

	public void setActName(String actName) {
		this.actName = actName;
	}

	public String getPaytype() {
		return paytype;
	}

	public String getAppName() {
		return appName;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
}
